//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2024 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
@_exported import SotoCore

/// Service object for interacting with AWS Wisdom service.
///
/// Amazon Connect Wisdom delivers agents the information they need to solve customer issues as they're actively speaking with customers. Agents can search across connected repositories from within their agent desktop to find answers quickly. Use Amazon Connect Wisdom to create an assistant and a knowledge base, for example, or manage content by uploading custom files.
public struct Wisdom: AWSService {
    // MARK: Member variables

    /// Client used for communication with AWS
    public let client: AWSClient
    /// Service configuration
    public let config: AWSServiceConfig

    // MARK: Initialization

    /// Initialize the Wisdom client
    /// - parameters:
    ///     - client: AWSClient used to process requests
    ///     - region: Region of server you want to communicate with. This will override the partition parameter.
    ///     - partition: AWS partition where service resides, standard (.aws), china (.awscn), government (.awsusgov).
    ///     - endpoint: Custom endpoint URL to use instead of standard AWS servers
    ///     - middleware: Middleware chain used to edit requests before they are sent and responses before they are decoded 
    ///     - timeout: Timeout value for HTTP requests
    ///     - byteBufferAllocator: Allocator for ByteBuffers
    ///     - options: Service options
    public init(
        client: AWSClient,
        region: SotoCore.Region? = nil,
        partition: AWSPartition = .aws,
        endpoint: String? = nil,
        middleware: AWSMiddlewareProtocol? = nil,
        timeout: TimeAmount? = nil,
        byteBufferAllocator: ByteBufferAllocator = ByteBufferAllocator(),
        options: AWSServiceConfig.Options = []
    ) {
        self.client = client
        self.config = AWSServiceConfig(
            region: region,
            partition: region?.partition ?? partition,
            serviceName: "Wisdom",
            serviceIdentifier: "wisdom",
            serviceProtocol: .restjson,
            apiVersion: "2020-10-19",
            endpoint: endpoint,
            variantEndpoints: Self.variantEndpoints,
            errorType: WisdomErrorType.self,
            middleware: middleware,
            timeout: timeout,
            byteBufferAllocator: byteBufferAllocator,
            options: options
        )
    }




    /// FIPS and dualstack endpoints
    static var variantEndpoints: [EndpointVariantType: AWSServiceConfig.EndpointVariant] {[
        [.fips]: .init(endpoints: [
            "ca-central-1": "wisdom-fips.ca-central-1.amazonaws.com",
            "us-east-1": "wisdom-fips.us-east-1.amazonaws.com",
            "us-west-2": "wisdom-fips.us-west-2.amazonaws.com"
        ])
    ]}

    // MARK: API Calls

    /// Creates an Amazon Connect Wisdom assistant.
    @Sendable
    @inlinable
    public func createAssistant(_ input: CreateAssistantRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateAssistantResponse {
        try await self.client.execute(
            operation: "CreateAssistant", 
            path: "/assistants", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates an Amazon Connect Wisdom assistant.
    ///
    /// Parameters:
    ///   - clientToken: A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs.
    ///   - description: The description of the assistant.
    ///   - name: The name of the assistant.
    ///   - serverSideEncryptionConfiguration: The configuration information for the customer managed key used for encryption.  The customer managed key must have a policy that allows kms:CreateGrant, kms:DescribeKey, and kms:Decrypt/kms:GenerateDataKey permissions to the IAM identity using the key to invoke Wisdom. To use Wisdom with chat, the key policy must also allow kms:Decrypt, kms:GenerateDataKey*, and kms:DescribeKey permissions to the connect.amazonaws.com service principal.  For more information about setting up a customer managed key for Wisdom, see Enable Amazon Connect Wisdom for your instance.
    ///   - tags: The tags used to organize, track, or control access for this resource.
    ///   - type: The type of assistant.
    ///   - logger: Logger use during operation
    @inlinable
    public func createAssistant(
        clientToken: String? = CreateAssistantRequest.idempotencyToken(),
        description: String? = nil,
        name: String,
        serverSideEncryptionConfiguration: ServerSideEncryptionConfiguration? = nil,
        tags: [String: String]? = nil,
        type: AssistantType,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateAssistantResponse {
        let input = CreateAssistantRequest(
            clientToken: clientToken, 
            description: description, 
            name: name, 
            serverSideEncryptionConfiguration: serverSideEncryptionConfiguration, 
            tags: tags, 
            type: type
        )
        return try await self.createAssistant(input, logger: logger)
    }

    /// Creates an association between an Amazon Connect Wisdom assistant and another resource. Currently, the only supported association is with a knowledge base. An assistant can have only a single association.
    @Sendable
    @inlinable
    public func createAssistantAssociation(_ input: CreateAssistantAssociationRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateAssistantAssociationResponse {
        try await self.client.execute(
            operation: "CreateAssistantAssociation", 
            path: "/assistants/{assistantId}/associations", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates an association between an Amazon Connect Wisdom assistant and another resource. Currently, the only supported association is with a knowledge base. An assistant can have only a single association.
    ///
    /// Parameters:
    ///   - assistantId: The identifier of the Wisdom assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.
    ///   - association: The identifier of the associated resource.
    ///   - associationType: The type of association.
    ///   - clientToken: A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs.
    ///   - tags: The tags used to organize, track, or control access for this resource.
    ///   - logger: Logger use during operation
    @inlinable
    public func createAssistantAssociation(
        assistantId: String,
        association: AssistantAssociationInputData,
        associationType: AssociationType,
        clientToken: String? = CreateAssistantAssociationRequest.idempotencyToken(),
        tags: [String: String]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateAssistantAssociationResponse {
        let input = CreateAssistantAssociationRequest(
            assistantId: assistantId, 
            association: association, 
            associationType: associationType, 
            clientToken: clientToken, 
            tags: tags
        )
        return try await self.createAssistantAssociation(input, logger: logger)
    }

    /// Creates Wisdom content. Before to calling this API, use StartContentUpload to upload an asset.
    @Sendable
    @inlinable
    public func createContent(_ input: CreateContentRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateContentResponse {
        try await self.client.execute(
            operation: "CreateContent", 
            path: "/knowledgeBases/{knowledgeBaseId}/contents", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates Wisdom content. Before to calling this API, use StartContentUpload to upload an asset.
    ///
    /// Parameters:
    ///   - clientToken: A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs.
    ///   - knowledgeBaseId: The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge
    ///   - metadata: A key/value map to store attributes without affecting tagging or recommendations.
    ///   - name: The name of the content. Each piece of content in a knowledge base must have a unique name. You can retrieve a piece of content using only its knowledge base and its name with the SearchContent API.
    ///   - overrideLinkOutUri: The URI you want to use for the article. If the knowledge base has a templateUri, setting this argument overrides it for this piece of content.
    ///   - tags: The tags used to organize, track, or control access for this resource.
    ///   - title: The title of the content. If not set, the title is equal to the name.
    ///   - uploadId: A pointer to the uploaded asset. This value is returned by StartContentUpload.
    ///   - logger: Logger use during operation
    @inlinable
    public func createContent(
        clientToken: String? = CreateContentRequest.idempotencyToken(),
        knowledgeBaseId: String,
        metadata: [String: String]? = nil,
        name: String,
        overrideLinkOutUri: String? = nil,
        tags: [String: String]? = nil,
        title: String? = nil,
        uploadId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateContentResponse {
        let input = CreateContentRequest(
            clientToken: clientToken, 
            knowledgeBaseId: knowledgeBaseId, 
            metadata: metadata, 
            name: name, 
            overrideLinkOutUri: overrideLinkOutUri, 
            tags: tags, 
            title: title, 
            uploadId: uploadId
        )
        return try await self.createContent(input, logger: logger)
    }

    /// Creates a knowledge base.  When using this API, you cannot reuse Amazon AppIntegrations DataIntegrations with external knowledge bases such as Salesforce and ServiceNow. If you do, you'll get an InvalidRequestException error.  For example, you're programmatically managing your external knowledge base, and you want to add or remove one of the fields that is being ingested from Salesforce. Do the following:   Call DeleteKnowledgeBase.   Call DeleteDataIntegration.   Call CreateDataIntegration to recreate the DataIntegration or a create different one.   Call CreateKnowledgeBase.
    @Sendable
    @inlinable
    public func createKnowledgeBase(_ input: CreateKnowledgeBaseRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateKnowledgeBaseResponse {
        try await self.client.execute(
            operation: "CreateKnowledgeBase", 
            path: "/knowledgeBases", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates a knowledge base.  When using this API, you cannot reuse Amazon AppIntegrations DataIntegrations with external knowledge bases such as Salesforce and ServiceNow. If you do, you'll get an InvalidRequestException error.  For example, you're programmatically managing your external knowledge base, and you want to add or remove one of the fields that is being ingested from Salesforce. Do the following:   Call DeleteKnowledgeBase.   Call DeleteDataIntegration.   Call CreateDataIntegration to recreate the DataIntegration or a create different one.   Call CreateKnowledgeBase.
    ///
    /// Parameters:
    ///   - clientToken: A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs.
    ///   - description: The description.
    ///   - knowledgeBaseType: The type of knowledge base. Only CUSTOM knowledge bases allow you to upload your own content. EXTERNAL knowledge bases support integrations with third-party systems whose content is synchronized automatically.
    ///   - name: The name of the knowledge base.
    ///   - renderingConfiguration: Information about how to render the content.
    ///   - serverSideEncryptionConfiguration: The configuration information for the customer managed key used for encryption.  This KMS key must have a policy that allows kms:CreateGrant, kms:DescribeKey, and kms:Decrypt/kms:GenerateDataKey permissions to the IAM identity using the key to invoke Wisdom. For more information about setting up a customer managed key for Wisdom, see Enable Amazon Connect Wisdom for your instance.
    ///   - sourceConfiguration: The source of the knowledge base content. Only set this argument for EXTERNAL knowledge bases.
    ///   - tags: The tags used to organize, track, or control access for this resource.
    ///   - logger: Logger use during operation
    @inlinable
    public func createKnowledgeBase(
        clientToken: String? = CreateKnowledgeBaseRequest.idempotencyToken(),
        description: String? = nil,
        knowledgeBaseType: KnowledgeBaseType,
        name: String,
        renderingConfiguration: RenderingConfiguration? = nil,
        serverSideEncryptionConfiguration: ServerSideEncryptionConfiguration? = nil,
        sourceConfiguration: SourceConfiguration? = nil,
        tags: [String: String]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateKnowledgeBaseResponse {
        let input = CreateKnowledgeBaseRequest(
            clientToken: clientToken, 
            description: description, 
            knowledgeBaseType: knowledgeBaseType, 
            name: name, 
            renderingConfiguration: renderingConfiguration, 
            serverSideEncryptionConfiguration: serverSideEncryptionConfiguration, 
            sourceConfiguration: sourceConfiguration, 
            tags: tags
        )
        return try await self.createKnowledgeBase(input, logger: logger)
    }

    /// Creates a Wisdom quick response.
    @Sendable
    @inlinable
    public func createQuickResponse(_ input: CreateQuickResponseRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateQuickResponseResponse {
        try await self.client.execute(
            operation: "CreateQuickResponse", 
            path: "/knowledgeBases/{knowledgeBaseId}/quickResponses", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates a Wisdom quick response.
    ///
    /// Parameters:
    ///   - channels: The Amazon Connect channels this quick response applies to.
    ///   - clientToken: A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs.
    ///   - content: The content of the quick response.
    ///   - contentType: The media type of the quick response content.   Use application/x.quickresponse;format=plain for a quick response written in plain text.   Use application/x.quickresponse;format=markdown for a quick response written in richtext.
    ///   - description: The description of the quick response.
    ///   - groupingConfiguration: The configuration information of the user groups that the quick response is accessible to.
    ///   - isActive: Whether the quick response is active.
    ///   - knowledgeBaseId: The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge
    ///   - language: The language code value for the language in which the quick response is written.  The supported language codes include de_DE, en_US, es_ES, fr_FR, id_ID, it_IT, ja_JP, ko_KR, pt_BR, zh_CN, zh_TW
    ///   - name: The name of the quick response.
    ///   - shortcutKey: The shortcut key of the quick response. The value should be unique across the knowledge base.
    ///   - tags: The tags used to organize, track, or control access for this resource.
    ///   - logger: Logger use during operation
    @inlinable
    public func createQuickResponse(
        channels: [String]? = nil,
        clientToken: String? = CreateQuickResponseRequest.idempotencyToken(),
        content: QuickResponseDataProvider,
        contentType: String? = nil,
        description: String? = nil,
        groupingConfiguration: GroupingConfiguration? = nil,
        isActive: Bool? = nil,
        knowledgeBaseId: String,
        language: String? = nil,
        name: String,
        shortcutKey: String? = nil,
        tags: [String: String]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateQuickResponseResponse {
        let input = CreateQuickResponseRequest(
            channels: channels, 
            clientToken: clientToken, 
            content: content, 
            contentType: contentType, 
            description: description, 
            groupingConfiguration: groupingConfiguration, 
            isActive: isActive, 
            knowledgeBaseId: knowledgeBaseId, 
            language: language, 
            name: name, 
            shortcutKey: shortcutKey, 
            tags: tags
        )
        return try await self.createQuickResponse(input, logger: logger)
    }

    /// Creates a session. A session is a contextual container used for generating recommendations. Amazon Connect creates a new Wisdom session for each contact on which Wisdom is enabled.
    @Sendable
    @inlinable
    public func createSession(_ input: CreateSessionRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateSessionResponse {
        try await self.client.execute(
            operation: "CreateSession", 
            path: "/assistants/{assistantId}/sessions", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates a session. A session is a contextual container used for generating recommendations. Amazon Connect creates a new Wisdom session for each contact on which Wisdom is enabled.
    ///
    /// Parameters:
    ///   - assistantId: The identifier of the Wisdom assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.
    ///   - clientToken: A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs.
    ///   - description: The description.
    ///   - name: The name of the session.
    ///   - tags: The tags used to organize, track, or control access for this resource.
    ///   - logger: Logger use during operation
    @inlinable
    public func createSession(
        assistantId: String,
        clientToken: String? = CreateSessionRequest.idempotencyToken(),
        description: String? = nil,
        name: String,
        tags: [String: String]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateSessionResponse {
        let input = CreateSessionRequest(
            assistantId: assistantId, 
            clientToken: clientToken, 
            description: description, 
            name: name, 
            tags: tags
        )
        return try await self.createSession(input, logger: logger)
    }

    /// Deletes an assistant.
    @Sendable
    @inlinable
    public func deleteAssistant(_ input: DeleteAssistantRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DeleteAssistantResponse {
        try await self.client.execute(
            operation: "DeleteAssistant", 
            path: "/assistants/{assistantId}", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes an assistant.
    ///
    /// Parameters:
    ///   - assistantId: The identifier of the Wisdom assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteAssistant(
        assistantId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeleteAssistantResponse {
        let input = DeleteAssistantRequest(
            assistantId: assistantId
        )
        return try await self.deleteAssistant(input, logger: logger)
    }

    /// Deletes an assistant association.
    @Sendable
    @inlinable
    public func deleteAssistantAssociation(_ input: DeleteAssistantAssociationRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DeleteAssistantAssociationResponse {
        try await self.client.execute(
            operation: "DeleteAssistantAssociation", 
            path: "/assistants/{assistantId}/associations/{assistantAssociationId}", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes an assistant association.
    ///
    /// Parameters:
    ///   - assistantAssociationId: The identifier of the assistant association. Can be either the ID or the ARN. URLs cannot contain the ARN.
    ///   - assistantId: The identifier of the Wisdom assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteAssistantAssociation(
        assistantAssociationId: String,
        assistantId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeleteAssistantAssociationResponse {
        let input = DeleteAssistantAssociationRequest(
            assistantAssociationId: assistantAssociationId, 
            assistantId: assistantId
        )
        return try await self.deleteAssistantAssociation(input, logger: logger)
    }

    /// Deletes the content.
    @Sendable
    @inlinable
    public func deleteContent(_ input: DeleteContentRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DeleteContentResponse {
        try await self.client.execute(
            operation: "DeleteContent", 
            path: "/knowledgeBases/{knowledgeBaseId}/contents/{contentId}", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes the content.
    ///
    /// Parameters:
    ///   - contentId: The identifier of the content. Can be either the ID or the ARN. URLs cannot contain the ARN.
    ///   - knowledgeBaseId: The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteContent(
        contentId: String,
        knowledgeBaseId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeleteContentResponse {
        let input = DeleteContentRequest(
            contentId: contentId, 
            knowledgeBaseId: knowledgeBaseId
        )
        return try await self.deleteContent(input, logger: logger)
    }

    /// Deletes the quick response import job.
    @Sendable
    @inlinable
    public func deleteImportJob(_ input: DeleteImportJobRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DeleteImportJobResponse {
        try await self.client.execute(
            operation: "DeleteImportJob", 
            path: "/knowledgeBases/{knowledgeBaseId}/importJobs/{importJobId}", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes the quick response import job.
    ///
    /// Parameters:
    ///   - importJobId: The identifier of the import job to be deleted.
    ///   - knowledgeBaseId: The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteImportJob(
        importJobId: String,
        knowledgeBaseId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeleteImportJobResponse {
        let input = DeleteImportJobRequest(
            importJobId: importJobId, 
            knowledgeBaseId: knowledgeBaseId
        )
        return try await self.deleteImportJob(input, logger: logger)
    }

    /// Deletes the knowledge base.  When you use this API to delete an external knowledge base such as Salesforce or ServiceNow, you must also delete the Amazon AppIntegrations DataIntegration. This is because you can't reuse the DataIntegration after it's been associated with an external knowledge base. However, you can delete and recreate it. See DeleteDataIntegration and CreateDataIntegration in the Amazon AppIntegrations API Reference.
    @Sendable
    @inlinable
    public func deleteKnowledgeBase(_ input: DeleteKnowledgeBaseRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DeleteKnowledgeBaseResponse {
        try await self.client.execute(
            operation: "DeleteKnowledgeBase", 
            path: "/knowledgeBases/{knowledgeBaseId}", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes the knowledge base.  When you use this API to delete an external knowledge base such as Salesforce or ServiceNow, you must also delete the Amazon AppIntegrations DataIntegration. This is because you can't reuse the DataIntegration after it's been associated with an external knowledge base. However, you can delete and recreate it. See DeleteDataIntegration and CreateDataIntegration in the Amazon AppIntegrations API Reference.
    ///
    /// Parameters:
    ///   - knowledgeBaseId: The knowledge base to delete content from. Can be either the ID or the ARN. URLs cannot contain the ARN.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteKnowledgeBase(
        knowledgeBaseId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeleteKnowledgeBaseResponse {
        let input = DeleteKnowledgeBaseRequest(
            knowledgeBaseId: knowledgeBaseId
        )
        return try await self.deleteKnowledgeBase(input, logger: logger)
    }

    /// Deletes a quick response.
    @Sendable
    @inlinable
    public func deleteQuickResponse(_ input: DeleteQuickResponseRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DeleteQuickResponseResponse {
        try await self.client.execute(
            operation: "DeleteQuickResponse", 
            path: "/knowledgeBases/{knowledgeBaseId}/quickResponses/{quickResponseId}", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes a quick response.
    ///
    /// Parameters:
    ///   - knowledgeBaseId: The knowledge base from which the quick response is deleted. The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge
    ///   - quickResponseId: The identifier of the quick response to delete.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteQuickResponse(
        knowledgeBaseId: String,
        quickResponseId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeleteQuickResponseResponse {
        let input = DeleteQuickResponseRequest(
            knowledgeBaseId: knowledgeBaseId, 
            quickResponseId: quickResponseId
        )
        return try await self.deleteQuickResponse(input, logger: logger)
    }

    /// Retrieves information about an assistant.
    @Sendable
    @inlinable
    public func getAssistant(_ input: GetAssistantRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetAssistantResponse {
        try await self.client.execute(
            operation: "GetAssistant", 
            path: "/assistants/{assistantId}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieves information about an assistant.
    ///
    /// Parameters:
    ///   - assistantId: The identifier of the Wisdom assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.
    ///   - logger: Logger use during operation
    @inlinable
    public func getAssistant(
        assistantId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetAssistantResponse {
        let input = GetAssistantRequest(
            assistantId: assistantId
        )
        return try await self.getAssistant(input, logger: logger)
    }

    /// Retrieves information about an assistant association.
    @Sendable
    @inlinable
    public func getAssistantAssociation(_ input: GetAssistantAssociationRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetAssistantAssociationResponse {
        try await self.client.execute(
            operation: "GetAssistantAssociation", 
            path: "/assistants/{assistantId}/associations/{assistantAssociationId}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieves information about an assistant association.
    ///
    /// Parameters:
    ///   - assistantAssociationId: The identifier of the assistant association. Can be either the ID or the ARN. URLs cannot contain the ARN.
    ///   - assistantId: The identifier of the Wisdom assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.
    ///   - logger: Logger use during operation
    @inlinable
    public func getAssistantAssociation(
        assistantAssociationId: String,
        assistantId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetAssistantAssociationResponse {
        let input = GetAssistantAssociationRequest(
            assistantAssociationId: assistantAssociationId, 
            assistantId: assistantId
        )
        return try await self.getAssistantAssociation(input, logger: logger)
    }

    /// Retrieves content, including a pre-signed URL to download the content.
    @Sendable
    @inlinable
    public func getContent(_ input: GetContentRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetContentResponse {
        try await self.client.execute(
            operation: "GetContent", 
            path: "/knowledgeBases/{knowledgeBaseId}/contents/{contentId}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieves content, including a pre-signed URL to download the content.
    ///
    /// Parameters:
    ///   - contentId: The identifier of the content. Can be either the ID or the ARN. URLs cannot contain the ARN.
    ///   - knowledgeBaseId: The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge
    ///   - logger: Logger use during operation
    @inlinable
    public func getContent(
        contentId: String,
        knowledgeBaseId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetContentResponse {
        let input = GetContentRequest(
            contentId: contentId, 
            knowledgeBaseId: knowledgeBaseId
        )
        return try await self.getContent(input, logger: logger)
    }

    /// Retrieves summary information about the content.
    @Sendable
    @inlinable
    public func getContentSummary(_ input: GetContentSummaryRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetContentSummaryResponse {
        try await self.client.execute(
            operation: "GetContentSummary", 
            path: "/knowledgeBases/{knowledgeBaseId}/contents/{contentId}/summary", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieves summary information about the content.
    ///
    /// Parameters:
    ///   - contentId: The identifier of the content. Can be either the ID or the ARN. URLs cannot contain the ARN.
    ///   - knowledgeBaseId: The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge
    ///   - logger: Logger use during operation
    @inlinable
    public func getContentSummary(
        contentId: String,
        knowledgeBaseId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetContentSummaryResponse {
        let input = GetContentSummaryRequest(
            contentId: contentId, 
            knowledgeBaseId: knowledgeBaseId
        )
        return try await self.getContentSummary(input, logger: logger)
    }

    /// Retrieves the started import job.
    @Sendable
    @inlinable
    public func getImportJob(_ input: GetImportJobRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetImportJobResponse {
        try await self.client.execute(
            operation: "GetImportJob", 
            path: "/knowledgeBases/{knowledgeBaseId}/importJobs/{importJobId}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieves the started import job.
    ///
    /// Parameters:
    ///   - importJobId: The identifier of the import job to retrieve.
    ///   - knowledgeBaseId: The identifier of the knowledge base that the import job belongs to.
    ///   - logger: Logger use during operation
    @inlinable
    public func getImportJob(
        importJobId: String,
        knowledgeBaseId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetImportJobResponse {
        let input = GetImportJobRequest(
            importJobId: importJobId, 
            knowledgeBaseId: knowledgeBaseId
        )
        return try await self.getImportJob(input, logger: logger)
    }

    /// Retrieves information about the knowledge base.
    @Sendable
    @inlinable
    public func getKnowledgeBase(_ input: GetKnowledgeBaseRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetKnowledgeBaseResponse {
        try await self.client.execute(
            operation: "GetKnowledgeBase", 
            path: "/knowledgeBases/{knowledgeBaseId}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieves information about the knowledge base.
    ///
    /// Parameters:
    ///   - knowledgeBaseId: The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge
    ///   - logger: Logger use during operation
    @inlinable
    public func getKnowledgeBase(
        knowledgeBaseId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetKnowledgeBaseResponse {
        let input = GetKnowledgeBaseRequest(
            knowledgeBaseId: knowledgeBaseId
        )
        return try await self.getKnowledgeBase(input, logger: logger)
    }

    /// Retrieves the quick response.
    @Sendable
    @inlinable
    public func getQuickResponse(_ input: GetQuickResponseRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetQuickResponseResponse {
        try await self.client.execute(
            operation: "GetQuickResponse", 
            path: "/knowledgeBases/{knowledgeBaseId}/quickResponses/{quickResponseId}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieves the quick response.
    ///
    /// Parameters:
    ///   - knowledgeBaseId: The identifier of the knowledge base. This should be a QUICK_RESPONSES type knowledge base.
    ///   - quickResponseId: The identifier of the quick response.
    ///   - logger: Logger use during operation
    @inlinable
    public func getQuickResponse(
        knowledgeBaseId: String,
        quickResponseId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetQuickResponseResponse {
        let input = GetQuickResponseRequest(
            knowledgeBaseId: knowledgeBaseId, 
            quickResponseId: quickResponseId
        )
        return try await self.getQuickResponse(input, logger: logger)
    }

    /// Retrieves recommendations for the specified session. To avoid retrieving the same recommendations in subsequent calls, use NotifyRecommendationsReceived. This API supports long-polling behavior with the waitTimeSeconds parameter. Short poll is the default behavior and only returns recommendations already available. To perform a manual query against an assistant, use QueryAssistant.
    @available(*, deprecated, message: "GetRecommendations API will be discontinued starting June 1, 2024. To receive generative responses after March 1, 2024 you will need to create a new Assistant in the Connect console and integrate the Amazon Q in Connect JavaScript library (amazon-q-connectjs) into your applications.")
    @Sendable
    @inlinable
    public func getRecommendations(_ input: GetRecommendationsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetRecommendationsResponse {
        try await self.client.execute(
            operation: "GetRecommendations", 
            path: "/assistants/{assistantId}/sessions/{sessionId}/recommendations", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieves recommendations for the specified session. To avoid retrieving the same recommendations in subsequent calls, use NotifyRecommendationsReceived. This API supports long-polling behavior with the waitTimeSeconds parameter. Short poll is the default behavior and only returns recommendations already available. To perform a manual query against an assistant, use QueryAssistant.
    ///
    /// Parameters:
    ///   - assistantId: The identifier of the Wisdom assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.
    ///   - maxResults: The maximum number of results to return per page.
    ///   - sessionId: The identifier of the session. Can be either the ID or the ARN. URLs cannot contain the ARN.
    ///   - waitTimeSeconds: The duration (in seconds) for which the call waits for a recommendation to be made available before returning. If a recommendation is available, the call returns sooner than WaitTimeSeconds. If no messages are available and the wait time expires, the call returns successfully with an empty list.
    ///   - logger: Logger use during operation
    @available(*, deprecated, message: "GetRecommendations API will be discontinued starting June 1, 2024. To receive generative responses after March 1, 2024 you will need to create a new Assistant in the Connect console and integrate the Amazon Q in Connect JavaScript library (amazon-q-connectjs) into your applications.")
    @inlinable
    public func getRecommendations(
        assistantId: String,
        maxResults: Int? = nil,
        sessionId: String,
        waitTimeSeconds: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetRecommendationsResponse {
        let input = GetRecommendationsRequest(
            assistantId: assistantId, 
            maxResults: maxResults, 
            sessionId: sessionId, 
            waitTimeSeconds: waitTimeSeconds
        )
        return try await self.getRecommendations(input, logger: logger)
    }

    /// Retrieves information for a specified session.
    @Sendable
    @inlinable
    public func getSession(_ input: GetSessionRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetSessionResponse {
        try await self.client.execute(
            operation: "GetSession", 
            path: "/assistants/{assistantId}/sessions/{sessionId}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieves information for a specified session.
    ///
    /// Parameters:
    ///   - assistantId: The identifier of the Wisdom assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.
    ///   - sessionId: The identifier of the session. Can be either the ID or the ARN. URLs cannot contain the ARN.
    ///   - logger: Logger use during operation
    @inlinable
    public func getSession(
        assistantId: String,
        sessionId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetSessionResponse {
        let input = GetSessionRequest(
            assistantId: assistantId, 
            sessionId: sessionId
        )
        return try await self.getSession(input, logger: logger)
    }

    /// Lists information about assistant associations.
    @Sendable
    @inlinable
    public func listAssistantAssociations(_ input: ListAssistantAssociationsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListAssistantAssociationsResponse {
        try await self.client.execute(
            operation: "ListAssistantAssociations", 
            path: "/assistants/{assistantId}/associations", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists information about assistant associations.
    ///
    /// Parameters:
    ///   - assistantId: The identifier of the Wisdom assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.
    ///   - maxResults: The maximum number of results to return per page.
    ///   - nextToken: The token for the next set of results. Use the value returned in the previous
    ///   - logger: Logger use during operation
    @inlinable
    public func listAssistantAssociations(
        assistantId: String,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListAssistantAssociationsResponse {
        let input = ListAssistantAssociationsRequest(
            assistantId: assistantId, 
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.listAssistantAssociations(input, logger: logger)
    }

    /// Lists information about assistants.
    @Sendable
    @inlinable
    public func listAssistants(_ input: ListAssistantsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListAssistantsResponse {
        try await self.client.execute(
            operation: "ListAssistants", 
            path: "/assistants", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists information about assistants.
    ///
    /// Parameters:
    ///   - maxResults: The maximum number of results to return per page.
    ///   - nextToken: The token for the next set of results. Use the value returned in the previous
    ///   - logger: Logger use during operation
    @inlinable
    public func listAssistants(
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListAssistantsResponse {
        let input = ListAssistantsRequest(
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.listAssistants(input, logger: logger)
    }

    /// Lists the content.
    @Sendable
    @inlinable
    public func listContents(_ input: ListContentsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListContentsResponse {
        try await self.client.execute(
            operation: "ListContents", 
            path: "/knowledgeBases/{knowledgeBaseId}/contents", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists the content.
    ///
    /// Parameters:
    ///   - knowledgeBaseId: The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge
    ///   - maxResults: The maximum number of results to return per page.
    ///   - nextToken: The token for the next set of results. Use the value returned in the previous
    ///   - logger: Logger use during operation
    @inlinable
    public func listContents(
        knowledgeBaseId: String,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListContentsResponse {
        let input = ListContentsRequest(
            knowledgeBaseId: knowledgeBaseId, 
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.listContents(input, logger: logger)
    }

    /// Lists information about import jobs.
    @Sendable
    @inlinable
    public func listImportJobs(_ input: ListImportJobsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListImportJobsResponse {
        try await self.client.execute(
            operation: "ListImportJobs", 
            path: "/knowledgeBases/{knowledgeBaseId}/importJobs", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists information about import jobs.
    ///
    /// Parameters:
    ///   - knowledgeBaseId: The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge
    ///   - maxResults: The maximum number of results to return per page.
    ///   - nextToken: The token for the next set of results. Use the value returned in the previous
    ///   - logger: Logger use during operation
    @inlinable
    public func listImportJobs(
        knowledgeBaseId: String,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListImportJobsResponse {
        let input = ListImportJobsRequest(
            knowledgeBaseId: knowledgeBaseId, 
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.listImportJobs(input, logger: logger)
    }

    /// Lists the knowledge bases.
    @Sendable
    @inlinable
    public func listKnowledgeBases(_ input: ListKnowledgeBasesRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListKnowledgeBasesResponse {
        try await self.client.execute(
            operation: "ListKnowledgeBases", 
            path: "/knowledgeBases", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists the knowledge bases.
    ///
    /// Parameters:
    ///   - maxResults: The maximum number of results to return per page.
    ///   - nextToken: The token for the next set of results. Use the value returned in the previous
    ///   - logger: Logger use during operation
    @inlinable
    public func listKnowledgeBases(
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListKnowledgeBasesResponse {
        let input = ListKnowledgeBasesRequest(
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.listKnowledgeBases(input, logger: logger)
    }

    /// Lists information about quick response.
    @Sendable
    @inlinable
    public func listQuickResponses(_ input: ListQuickResponsesRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListQuickResponsesResponse {
        try await self.client.execute(
            operation: "ListQuickResponses", 
            path: "/knowledgeBases/{knowledgeBaseId}/quickResponses", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists information about quick response.
    ///
    /// Parameters:
    ///   - knowledgeBaseId: The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge
    ///   - maxResults: The maximum number of results to return per page.
    ///   - nextToken: The token for the next set of results. Use the value returned in the previous
    ///   - logger: Logger use during operation
    @inlinable
    public func listQuickResponses(
        knowledgeBaseId: String,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListQuickResponsesResponse {
        let input = ListQuickResponsesRequest(
            knowledgeBaseId: knowledgeBaseId, 
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.listQuickResponses(input, logger: logger)
    }

    /// Lists the tags for the specified resource.
    @Sendable
    @inlinable
    public func listTagsForResource(_ input: ListTagsForResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListTagsForResourceResponse {
        try await self.client.execute(
            operation: "ListTagsForResource", 
            path: "/tags/{resourceArn}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists the tags for the specified resource.
    ///
    /// Parameters:
    ///   - resourceArn: The Amazon Resource Name (ARN) of the resource.
    ///   - logger: Logger use during operation
    @inlinable
    public func listTagsForResource(
        resourceArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListTagsForResourceResponse {
        let input = ListTagsForResourceRequest(
            resourceArn: resourceArn
        )
        return try await self.listTagsForResource(input, logger: logger)
    }

    /// Removes the specified recommendations from the specified assistant's queue of newly available recommendations. You can use this API in conjunction with GetRecommendations and a waitTimeSeconds input for long-polling behavior and avoiding duplicate recommendations.
    @Sendable
    @inlinable
    public func notifyRecommendationsReceived(_ input: NotifyRecommendationsReceivedRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> NotifyRecommendationsReceivedResponse {
        try await self.client.execute(
            operation: "NotifyRecommendationsReceived", 
            path: "/assistants/{assistantId}/sessions/{sessionId}/recommendations/notify", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Removes the specified recommendations from the specified assistant's queue of newly available recommendations. You can use this API in conjunction with GetRecommendations and a waitTimeSeconds input for long-polling behavior and avoiding duplicate recommendations.
    ///
    /// Parameters:
    ///   - assistantId: The identifier of the Wisdom assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.
    ///   - recommendationIds: The identifiers of the recommendations.
    ///   - sessionId: The identifier of the session. Can be either the ID or the ARN. URLs cannot contain the ARN.
    ///   - logger: Logger use during operation
    @inlinable
    public func notifyRecommendationsReceived(
        assistantId: String,
        recommendationIds: [String],
        sessionId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> NotifyRecommendationsReceivedResponse {
        let input = NotifyRecommendationsReceivedRequest(
            assistantId: assistantId, 
            recommendationIds: recommendationIds, 
            sessionId: sessionId
        )
        return try await self.notifyRecommendationsReceived(input, logger: logger)
    }

    /// Performs a manual search against the specified assistant. To retrieve recommendations for an assistant, use GetRecommendations.
    @available(*, deprecated, message: "QueryAssistant API will be discontinued starting June 1, 2024. To receive generative responses after March 1, 2024 you will need to create a new Assistant in the Connect console and integrate the Amazon Q in Connect JavaScript library (amazon-q-connectjs) into your applications.")
    @Sendable
    @inlinable
    public func queryAssistant(_ input: QueryAssistantRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> QueryAssistantResponse {
        try await self.client.execute(
            operation: "QueryAssistant", 
            path: "/assistants/{assistantId}/query", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Performs a manual search against the specified assistant. To retrieve recommendations for an assistant, use GetRecommendations.
    ///
    /// Parameters:
    ///   - assistantId: The identifier of the Wisdom assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.
    ///   - maxResults: The maximum number of results to return per page.
    ///   - nextToken: The token for the next set of results. Use the value returned in the previous
    ///   - queryText: The text to search for.
    ///   - logger: Logger use during operation
    @available(*, deprecated, message: "QueryAssistant API will be discontinued starting June 1, 2024. To receive generative responses after March 1, 2024 you will need to create a new Assistant in the Connect console and integrate the Amazon Q in Connect JavaScript library (amazon-q-connectjs) into your applications.")
    @inlinable
    public func queryAssistant(
        assistantId: String,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        queryText: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> QueryAssistantResponse {
        let input = QueryAssistantRequest(
            assistantId: assistantId, 
            maxResults: maxResults, 
            nextToken: nextToken, 
            queryText: queryText
        )
        return try await self.queryAssistant(input, logger: logger)
    }

    /// Removes a URI template from a knowledge base.
    @Sendable
    @inlinable
    public func removeKnowledgeBaseTemplateUri(_ input: RemoveKnowledgeBaseTemplateUriRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> RemoveKnowledgeBaseTemplateUriResponse {
        try await self.client.execute(
            operation: "RemoveKnowledgeBaseTemplateUri", 
            path: "/knowledgeBases/{knowledgeBaseId}/templateUri", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Removes a URI template from a knowledge base.
    ///
    /// Parameters:
    ///   - knowledgeBaseId: The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge
    ///   - logger: Logger use during operation
    @inlinable
    public func removeKnowledgeBaseTemplateUri(
        knowledgeBaseId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> RemoveKnowledgeBaseTemplateUriResponse {
        let input = RemoveKnowledgeBaseTemplateUriRequest(
            knowledgeBaseId: knowledgeBaseId
        )
        return try await self.removeKnowledgeBaseTemplateUri(input, logger: logger)
    }

    /// Searches for content in a specified knowledge base. Can be used to get a specific content resource by its name.
    @Sendable
    @inlinable
    public func searchContent(_ input: SearchContentRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> SearchContentResponse {
        try await self.client.execute(
            operation: "SearchContent", 
            path: "/knowledgeBases/{knowledgeBaseId}/search", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Searches for content in a specified knowledge base. Can be used to get a specific content resource by its name.
    ///
    /// Parameters:
    ///   - knowledgeBaseId: The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge
    ///   - maxResults: The maximum number of results to return per page.
    ///   - nextToken: The token for the next set of results. Use the value returned in the previous
    ///   - searchExpression: The search expression to filter results.
    ///   - logger: Logger use during operation
    @inlinable
    public func searchContent(
        knowledgeBaseId: String,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        searchExpression: SearchExpression,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> SearchContentResponse {
        let input = SearchContentRequest(
            knowledgeBaseId: knowledgeBaseId, 
            maxResults: maxResults, 
            nextToken: nextToken, 
            searchExpression: searchExpression
        )
        return try await self.searchContent(input, logger: logger)
    }

    /// Searches existing Wisdom quick responses in a Wisdom knowledge base.
    @Sendable
    @inlinable
    public func searchQuickResponses(_ input: SearchQuickResponsesRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> SearchQuickResponsesResponse {
        try await self.client.execute(
            operation: "SearchQuickResponses", 
            path: "/knowledgeBases/{knowledgeBaseId}/search/quickResponses", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Searches existing Wisdom quick responses in a Wisdom knowledge base.
    ///
    /// Parameters:
    ///   - attributes: The user-defined Amazon Connect contact attributes to be resolved when search results are returned.
    ///   - knowledgeBaseId: The identifier of the knowledge base. This should be a QUICK_RESPONSES type knowledge base. Can be either the ID or the ARN. URLs cannot contain the ARN.
    ///   - maxResults: The maximum number of results to return per page.
    ///   - nextToken: The token for the next set of results. Use the value returned in the previous
    ///   - searchExpression: The search expression for querying the quick response.
    ///   - logger: Logger use during operation
    @inlinable
    public func searchQuickResponses(
        attributes: [String: String]? = nil,
        knowledgeBaseId: String,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        searchExpression: QuickResponseSearchExpression,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> SearchQuickResponsesResponse {
        let input = SearchQuickResponsesRequest(
            attributes: attributes, 
            knowledgeBaseId: knowledgeBaseId, 
            maxResults: maxResults, 
            nextToken: nextToken, 
            searchExpression: searchExpression
        )
        return try await self.searchQuickResponses(input, logger: logger)
    }

    /// Searches for sessions.
    @Sendable
    @inlinable
    public func searchSessions(_ input: SearchSessionsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> SearchSessionsResponse {
        try await self.client.execute(
            operation: "SearchSessions", 
            path: "/assistants/{assistantId}/searchSessions", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Searches for sessions.
    ///
    /// Parameters:
    ///   - assistantId: The identifier of the Wisdom assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.
    ///   - maxResults: The maximum number of results to return per page.
    ///   - nextToken: The token for the next set of results. Use the value returned in the previous
    ///   - searchExpression: The search expression to filter results.
    ///   - logger: Logger use during operation
    @inlinable
    public func searchSessions(
        assistantId: String,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        searchExpression: SearchExpression,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> SearchSessionsResponse {
        let input = SearchSessionsRequest(
            assistantId: assistantId, 
            maxResults: maxResults, 
            nextToken: nextToken, 
            searchExpression: searchExpression
        )
        return try await self.searchSessions(input, logger: logger)
    }

    /// Get a URL to upload content to a knowledge base. To upload content, first make a PUT request to the returned URL with your file, making sure to include the required headers. Then use CreateContent to finalize the content creation process or UpdateContent to modify an existing resource. You can only upload content to a knowledge base of type CUSTOM.
    @Sendable
    @inlinable
    public func startContentUpload(_ input: StartContentUploadRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> StartContentUploadResponse {
        try await self.client.execute(
            operation: "StartContentUpload", 
            path: "/knowledgeBases/{knowledgeBaseId}/upload", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Get a URL to upload content to a knowledge base. To upload content, first make a PUT request to the returned URL with your file, making sure to include the required headers. Then use CreateContent to finalize the content creation process or UpdateContent to modify an existing resource. You can only upload content to a knowledge base of type CUSTOM.
    ///
    /// Parameters:
    ///   - contentType: The type of content to upload.
    ///   - knowledgeBaseId: The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge
    ///   - presignedUrlTimeToLive: The expected expiration time of the generated presigned URL, specified in minutes.
    ///   - logger: Logger use during operation
    @inlinable
    public func startContentUpload(
        contentType: String,
        knowledgeBaseId: String,
        presignedUrlTimeToLive: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> StartContentUploadResponse {
        let input = StartContentUploadRequest(
            contentType: contentType, 
            knowledgeBaseId: knowledgeBaseId, 
            presignedUrlTimeToLive: presignedUrlTimeToLive
        )
        return try await self.startContentUpload(input, logger: logger)
    }

    /// Start an asynchronous job to import Wisdom resources from an uploaded source file. Before calling this API, use StartContentUpload to upload an asset that contains the resource data.   For importing Wisdom quick responses, you need to upload a csv file including the quick responses. For information about how to format the csv file for importing quick responses, see Import quick responses.
    @Sendable
    @inlinable
    public func startImportJob(_ input: StartImportJobRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> StartImportJobResponse {
        try await self.client.execute(
            operation: "StartImportJob", 
            path: "/knowledgeBases/{knowledgeBaseId}/importJobs", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Start an asynchronous job to import Wisdom resources from an uploaded source file. Before calling this API, use StartContentUpload to upload an asset that contains the resource data.   For importing Wisdom quick responses, you need to upload a csv file including the quick responses. For information about how to format the csv file for importing quick responses, see Import quick responses.
    ///
    /// Parameters:
    ///   - clientToken: The tags used to organize, track, or control access for this resource.
    ///   - externalSourceConfiguration: The configuration information of the external source that the resource data are imported from.
    ///   - importJobType: The type of the import job.   For importing quick response resource, set the value to QUICK_RESPONSES.
    ///   - knowledgeBaseId: The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge
    ///   - metadata: The metadata fields of the imported Wisdom resources.
    ///   - uploadId: A pointer to the uploaded asset. This value is returned by StartContentUpload.
    ///   - logger: Logger use during operation
    @inlinable
    public func startImportJob(
        clientToken: String? = StartImportJobRequest.idempotencyToken(),
        externalSourceConfiguration: ExternalSourceConfiguration? = nil,
        importJobType: ImportJobType,
        knowledgeBaseId: String,
        metadata: [String: String]? = nil,
        uploadId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> StartImportJobResponse {
        let input = StartImportJobRequest(
            clientToken: clientToken, 
            externalSourceConfiguration: externalSourceConfiguration, 
            importJobType: importJobType, 
            knowledgeBaseId: knowledgeBaseId, 
            metadata: metadata, 
            uploadId: uploadId
        )
        return try await self.startImportJob(input, logger: logger)
    }

    /// Adds the specified tags to the specified resource.
    @Sendable
    @inlinable
    public func tagResource(_ input: TagResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> TagResourceResponse {
        try await self.client.execute(
            operation: "TagResource", 
            path: "/tags/{resourceArn}", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Adds the specified tags to the specified resource.
    ///
    /// Parameters:
    ///   - resourceArn: The Amazon Resource Name (ARN) of the resource.
    ///   - tags: The tags used to organize, track, or control access for this resource.
    ///   - logger: Logger use during operation
    @inlinable
    public func tagResource(
        resourceArn: String,
        tags: [String: String],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> TagResourceResponse {
        let input = TagResourceRequest(
            resourceArn: resourceArn, 
            tags: tags
        )
        return try await self.tagResource(input, logger: logger)
    }

    /// Removes the specified tags from the specified resource.
    @Sendable
    @inlinable
    public func untagResource(_ input: UntagResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UntagResourceResponse {
        try await self.client.execute(
            operation: "UntagResource", 
            path: "/tags/{resourceArn}", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Removes the specified tags from the specified resource.
    ///
    /// Parameters:
    ///   - resourceArn: The Amazon Resource Name (ARN) of the resource.
    ///   - tagKeys: The tag keys.
    ///   - logger: Logger use during operation
    @inlinable
    public func untagResource(
        resourceArn: String,
        tagKeys: [String],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UntagResourceResponse {
        let input = UntagResourceRequest(
            resourceArn: resourceArn, 
            tagKeys: tagKeys
        )
        return try await self.untagResource(input, logger: logger)
    }

    /// Updates information about the content.
    @Sendable
    @inlinable
    public func updateContent(_ input: UpdateContentRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdateContentResponse {
        try await self.client.execute(
            operation: "UpdateContent", 
            path: "/knowledgeBases/{knowledgeBaseId}/contents/{contentId}", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Updates information about the content.
    ///
    /// Parameters:
    ///   - contentId: The identifier of the content. Can be either the ID or the ARN. URLs cannot contain the ARN.
    ///   - knowledgeBaseId: The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge
    ///   - metadata: A key/value map to store attributes without affecting tagging or recommendations. For example, when synchronizing data between an external system and Wisdom, you can store an external version identifier as metadata to utilize for determining drift.
    ///   - overrideLinkOutUri: The URI for the article. If the knowledge base has a templateUri, setting this argument overrides it for this piece of content. To remove an existing overrideLinkOurUri, exclude this argument and set removeOverrideLinkOutUri to true.
    ///   - removeOverrideLinkOutUri: Unset the existing overrideLinkOutUri if it exists.
    ///   - revisionId: The revisionId of the content resource to update, taken from an earlier call to GetContent, GetContentSummary, SearchContent, or ListContents. If included, this argument acts as an optimistic lock to ensure content was not modified since it was last read. If it has been modified, this API throws a PreconditionFailedException.
    ///   - title: The title of the content.
    ///   - uploadId: A pointer to the uploaded asset. This value is returned by StartContentUpload.
    ///   - logger: Logger use during operation
    @inlinable
    public func updateContent(
        contentId: String,
        knowledgeBaseId: String,
        metadata: [String: String]? = nil,
        overrideLinkOutUri: String? = nil,
        removeOverrideLinkOutUri: Bool? = nil,
        revisionId: String? = nil,
        title: String? = nil,
        uploadId: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdateContentResponse {
        let input = UpdateContentRequest(
            contentId: contentId, 
            knowledgeBaseId: knowledgeBaseId, 
            metadata: metadata, 
            overrideLinkOutUri: overrideLinkOutUri, 
            removeOverrideLinkOutUri: removeOverrideLinkOutUri, 
            revisionId: revisionId, 
            title: title, 
            uploadId: uploadId
        )
        return try await self.updateContent(input, logger: logger)
    }

    /// Updates the template URI of a knowledge base. This is only supported for knowledge bases of type EXTERNAL. Include a single variable in ${variable} format; this interpolated by Wisdom using ingested content. For example, if you ingest a Salesforce article, it has an Id value, and you can set the template URI to https://myInstanceName.lightning.force.com/lightning/r/Knowledge__kav/*${Id}*/view.
    @Sendable
    @inlinable
    public func updateKnowledgeBaseTemplateUri(_ input: UpdateKnowledgeBaseTemplateUriRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdateKnowledgeBaseTemplateUriResponse {
        try await self.client.execute(
            operation: "UpdateKnowledgeBaseTemplateUri", 
            path: "/knowledgeBases/{knowledgeBaseId}/templateUri", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Updates the template URI of a knowledge base. This is only supported for knowledge bases of type EXTERNAL. Include a single variable in ${variable} format; this interpolated by Wisdom using ingested content. For example, if you ingest a Salesforce article, it has an Id value, and you can set the template URI to https://myInstanceName.lightning.force.com/lightning/r/Knowledge__kav/*${Id}*/view.
    ///
    /// Parameters:
    ///   - knowledgeBaseId: The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge
    ///   - templateUri: The template URI to update.
    ///   - logger: Logger use during operation
    @inlinable
    public func updateKnowledgeBaseTemplateUri(
        knowledgeBaseId: String,
        templateUri: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdateKnowledgeBaseTemplateUriResponse {
        let input = UpdateKnowledgeBaseTemplateUriRequest(
            knowledgeBaseId: knowledgeBaseId, 
            templateUri: templateUri
        )
        return try await self.updateKnowledgeBaseTemplateUri(input, logger: logger)
    }

    /// Updates an existing Wisdom quick response.
    @Sendable
    @inlinable
    public func updateQuickResponse(_ input: UpdateQuickResponseRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdateQuickResponseResponse {
        try await self.client.execute(
            operation: "UpdateQuickResponse", 
            path: "/knowledgeBases/{knowledgeBaseId}/quickResponses/{quickResponseId}", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Updates an existing Wisdom quick response.
    ///
    /// Parameters:
    ///   - channels: The Amazon Connect contact channels this quick response applies to. The supported contact channel types include Chat.
    ///   - content: The updated content of the quick response.
    ///   - contentType: The media type of the quick response content.   Use application/x.quickresponse;format=plain for quick response written in plain text.   Use application/x.quickresponse;format=markdown for quick response written in richtext.
    ///   - description: The updated description of the quick response.
    ///   - groupingConfiguration: The updated grouping configuration of the quick response.
    ///   - isActive: Whether the quick response is active.
    ///   - knowledgeBaseId: The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge
    ///   - language: The language code value for the language in which the quick response is written. The supported language codes include de_DE, en_US, es_ES, fr_FR, id_ID, it_IT, ja_JP, ko_KR, pt_BR, zh_CN, zh_TW
    ///   - name: The name of the quick response.
    ///   - quickResponseId: The identifier of the quick response.
    ///   - removeDescription: Whether to remove the description from the quick response.
    ///   - removeGroupingConfiguration: Whether to remove the grouping configuration of the quick response.
    ///   - removeShortcutKey: Whether to remove the shortcut key of the quick response.
    ///   - shortcutKey: The shortcut key of the quick response. The value should be unique across the knowledge base.
    ///   - logger: Logger use during operation
    @inlinable
    public func updateQuickResponse(
        channels: [String]? = nil,
        content: QuickResponseDataProvider? = nil,
        contentType: String? = nil,
        description: String? = nil,
        groupingConfiguration: GroupingConfiguration? = nil,
        isActive: Bool? = nil,
        knowledgeBaseId: String,
        language: String? = nil,
        name: String? = nil,
        quickResponseId: String,
        removeDescription: Bool? = nil,
        removeGroupingConfiguration: Bool? = nil,
        removeShortcutKey: Bool? = nil,
        shortcutKey: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdateQuickResponseResponse {
        let input = UpdateQuickResponseRequest(
            channels: channels, 
            content: content, 
            contentType: contentType, 
            description: description, 
            groupingConfiguration: groupingConfiguration, 
            isActive: isActive, 
            knowledgeBaseId: knowledgeBaseId, 
            language: language, 
            name: name, 
            quickResponseId: quickResponseId, 
            removeDescription: removeDescription, 
            removeGroupingConfiguration: removeGroupingConfiguration, 
            removeShortcutKey: removeShortcutKey, 
            shortcutKey: shortcutKey
        )
        return try await self.updateQuickResponse(input, logger: logger)
    }
}

extension Wisdom {
    /// Initializer required by `AWSService.with(middlewares:timeout:byteBufferAllocator:options)`. You are not able to use this initializer directly as there are not public
    /// initializers for `AWSServiceConfig.Patch`. Please use `AWSService.with(middlewares:timeout:byteBufferAllocator:options)` instead.
    public init(from: Wisdom, patch: AWSServiceConfig.Patch) {
        self.client = from.client
        self.config = from.config.with(patch: patch)
    }
}

// MARK: Paginators

@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Wisdom {
    /// Return PaginatorSequence for operation ``listAssistantAssociations(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listAssistantAssociationsPaginator(
        _ input: ListAssistantAssociationsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListAssistantAssociationsRequest, ListAssistantAssociationsResponse> {
        return .init(
            input: input,
            command: self.listAssistantAssociations,
            inputKey: \ListAssistantAssociationsRequest.nextToken,
            outputKey: \ListAssistantAssociationsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listAssistantAssociations(_:logger:)``.
    ///
    /// - Parameters:
    ///   - assistantId: The identifier of the Wisdom assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.
    ///   - maxResults: The maximum number of results to return per page.
    ///   - logger: Logger used for logging
    @inlinable
    public func listAssistantAssociationsPaginator(
        assistantId: String,
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListAssistantAssociationsRequest, ListAssistantAssociationsResponse> {
        let input = ListAssistantAssociationsRequest(
            assistantId: assistantId, 
            maxResults: maxResults
        )
        return self.listAssistantAssociationsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listAssistants(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listAssistantsPaginator(
        _ input: ListAssistantsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListAssistantsRequest, ListAssistantsResponse> {
        return .init(
            input: input,
            command: self.listAssistants,
            inputKey: \ListAssistantsRequest.nextToken,
            outputKey: \ListAssistantsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listAssistants(_:logger:)``.
    ///
    /// - Parameters:
    ///   - maxResults: The maximum number of results to return per page.
    ///   - logger: Logger used for logging
    @inlinable
    public func listAssistantsPaginator(
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListAssistantsRequest, ListAssistantsResponse> {
        let input = ListAssistantsRequest(
            maxResults: maxResults
        )
        return self.listAssistantsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listContents(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listContentsPaginator(
        _ input: ListContentsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListContentsRequest, ListContentsResponse> {
        return .init(
            input: input,
            command: self.listContents,
            inputKey: \ListContentsRequest.nextToken,
            outputKey: \ListContentsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listContents(_:logger:)``.
    ///
    /// - Parameters:
    ///   - knowledgeBaseId: The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge
    ///   - maxResults: The maximum number of results to return per page.
    ///   - logger: Logger used for logging
    @inlinable
    public func listContentsPaginator(
        knowledgeBaseId: String,
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListContentsRequest, ListContentsResponse> {
        let input = ListContentsRequest(
            knowledgeBaseId: knowledgeBaseId, 
            maxResults: maxResults
        )
        return self.listContentsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listImportJobs(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listImportJobsPaginator(
        _ input: ListImportJobsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListImportJobsRequest, ListImportJobsResponse> {
        return .init(
            input: input,
            command: self.listImportJobs,
            inputKey: \ListImportJobsRequest.nextToken,
            outputKey: \ListImportJobsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listImportJobs(_:logger:)``.
    ///
    /// - Parameters:
    ///   - knowledgeBaseId: The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge
    ///   - maxResults: The maximum number of results to return per page.
    ///   - logger: Logger used for logging
    @inlinable
    public func listImportJobsPaginator(
        knowledgeBaseId: String,
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListImportJobsRequest, ListImportJobsResponse> {
        let input = ListImportJobsRequest(
            knowledgeBaseId: knowledgeBaseId, 
            maxResults: maxResults
        )
        return self.listImportJobsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listKnowledgeBases(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listKnowledgeBasesPaginator(
        _ input: ListKnowledgeBasesRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListKnowledgeBasesRequest, ListKnowledgeBasesResponse> {
        return .init(
            input: input,
            command: self.listKnowledgeBases,
            inputKey: \ListKnowledgeBasesRequest.nextToken,
            outputKey: \ListKnowledgeBasesResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listKnowledgeBases(_:logger:)``.
    ///
    /// - Parameters:
    ///   - maxResults: The maximum number of results to return per page.
    ///   - logger: Logger used for logging
    @inlinable
    public func listKnowledgeBasesPaginator(
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListKnowledgeBasesRequest, ListKnowledgeBasesResponse> {
        let input = ListKnowledgeBasesRequest(
            maxResults: maxResults
        )
        return self.listKnowledgeBasesPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listQuickResponses(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listQuickResponsesPaginator(
        _ input: ListQuickResponsesRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListQuickResponsesRequest, ListQuickResponsesResponse> {
        return .init(
            input: input,
            command: self.listQuickResponses,
            inputKey: \ListQuickResponsesRequest.nextToken,
            outputKey: \ListQuickResponsesResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listQuickResponses(_:logger:)``.
    ///
    /// - Parameters:
    ///   - knowledgeBaseId: The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge
    ///   - maxResults: The maximum number of results to return per page.
    ///   - logger: Logger used for logging
    @inlinable
    public func listQuickResponsesPaginator(
        knowledgeBaseId: String,
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListQuickResponsesRequest, ListQuickResponsesResponse> {
        let input = ListQuickResponsesRequest(
            knowledgeBaseId: knowledgeBaseId, 
            maxResults: maxResults
        )
        return self.listQuickResponsesPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``queryAssistant(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @available(*, deprecated, message: "QueryAssistant API will be discontinued starting June 1, 2024. To receive generative responses after March 1, 2024 you will need to create a new Assistant in the Connect console and integrate the Amazon Q in Connect JavaScript library (amazon-q-connectjs) into your applications.")
    @inlinable
    public func queryAssistantPaginator(
        _ input: QueryAssistantRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<QueryAssistantRequest, QueryAssistantResponse> {
        return .init(
            input: input,
            command: self.queryAssistant,
            inputKey: \QueryAssistantRequest.nextToken,
            outputKey: \QueryAssistantResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``queryAssistant(_:logger:)``.
    ///
    /// - Parameters:
    ///   - assistantId: The identifier of the Wisdom assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.
    ///   - maxResults: The maximum number of results to return per page.
    ///   - queryText: The text to search for.
    ///   - logger: Logger used for logging
    @available(*, deprecated, message: "QueryAssistant API will be discontinued starting June 1, 2024. To receive generative responses after March 1, 2024 you will need to create a new Assistant in the Connect console and integrate the Amazon Q in Connect JavaScript library (amazon-q-connectjs) into your applications.")
    @inlinable
    public func queryAssistantPaginator(
        assistantId: String,
        maxResults: Int? = nil,
        queryText: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<QueryAssistantRequest, QueryAssistantResponse> {
        let input = QueryAssistantRequest(
            assistantId: assistantId, 
            maxResults: maxResults, 
            queryText: queryText
        )
        return self.queryAssistantPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``searchContent(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func searchContentPaginator(
        _ input: SearchContentRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<SearchContentRequest, SearchContentResponse> {
        return .init(
            input: input,
            command: self.searchContent,
            inputKey: \SearchContentRequest.nextToken,
            outputKey: \SearchContentResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``searchContent(_:logger:)``.
    ///
    /// - Parameters:
    ///   - knowledgeBaseId: The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge
    ///   - maxResults: The maximum number of results to return per page.
    ///   - searchExpression: The search expression to filter results.
    ///   - logger: Logger used for logging
    @inlinable
    public func searchContentPaginator(
        knowledgeBaseId: String,
        maxResults: Int? = nil,
        searchExpression: SearchExpression,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<SearchContentRequest, SearchContentResponse> {
        let input = SearchContentRequest(
            knowledgeBaseId: knowledgeBaseId, 
            maxResults: maxResults, 
            searchExpression: searchExpression
        )
        return self.searchContentPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``searchQuickResponses(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func searchQuickResponsesPaginator(
        _ input: SearchQuickResponsesRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<SearchQuickResponsesRequest, SearchQuickResponsesResponse> {
        return .init(
            input: input,
            command: self.searchQuickResponses,
            inputKey: \SearchQuickResponsesRequest.nextToken,
            outputKey: \SearchQuickResponsesResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``searchQuickResponses(_:logger:)``.
    ///
    /// - Parameters:
    ///   - attributes: The user-defined Amazon Connect contact attributes to be resolved when search results are returned.
    ///   - knowledgeBaseId: The identifier of the knowledge base. This should be a QUICK_RESPONSES type knowledge base. Can be either the ID or the ARN. URLs cannot contain the ARN.
    ///   - maxResults: The maximum number of results to return per page.
    ///   - searchExpression: The search expression for querying the quick response.
    ///   - logger: Logger used for logging
    @inlinable
    public func searchQuickResponsesPaginator(
        attributes: [String: String]? = nil,
        knowledgeBaseId: String,
        maxResults: Int? = nil,
        searchExpression: QuickResponseSearchExpression,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<SearchQuickResponsesRequest, SearchQuickResponsesResponse> {
        let input = SearchQuickResponsesRequest(
            attributes: attributes, 
            knowledgeBaseId: knowledgeBaseId, 
            maxResults: maxResults, 
            searchExpression: searchExpression
        )
        return self.searchQuickResponsesPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``searchSessions(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func searchSessionsPaginator(
        _ input: SearchSessionsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<SearchSessionsRequest, SearchSessionsResponse> {
        return .init(
            input: input,
            command: self.searchSessions,
            inputKey: \SearchSessionsRequest.nextToken,
            outputKey: \SearchSessionsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``searchSessions(_:logger:)``.
    ///
    /// - Parameters:
    ///   - assistantId: The identifier of the Wisdom assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.
    ///   - maxResults: The maximum number of results to return per page.
    ///   - searchExpression: The search expression to filter results.
    ///   - logger: Logger used for logging
    @inlinable
    public func searchSessionsPaginator(
        assistantId: String,
        maxResults: Int? = nil,
        searchExpression: SearchExpression,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<SearchSessionsRequest, SearchSessionsResponse> {
        let input = SearchSessionsRequest(
            assistantId: assistantId, 
            maxResults: maxResults, 
            searchExpression: searchExpression
        )
        return self.searchSessionsPaginator(input, logger: logger)
    }
}

extension Wisdom.ListAssistantAssociationsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> Wisdom.ListAssistantAssociationsRequest {
        return .init(
            assistantId: self.assistantId,
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}

extension Wisdom.ListAssistantsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> Wisdom.ListAssistantsRequest {
        return .init(
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}

extension Wisdom.ListContentsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> Wisdom.ListContentsRequest {
        return .init(
            knowledgeBaseId: self.knowledgeBaseId,
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}

extension Wisdom.ListImportJobsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> Wisdom.ListImportJobsRequest {
        return .init(
            knowledgeBaseId: self.knowledgeBaseId,
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}

extension Wisdom.ListKnowledgeBasesRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> Wisdom.ListKnowledgeBasesRequest {
        return .init(
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}

extension Wisdom.ListQuickResponsesRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> Wisdom.ListQuickResponsesRequest {
        return .init(
            knowledgeBaseId: self.knowledgeBaseId,
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}

extension Wisdom.QueryAssistantRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> Wisdom.QueryAssistantRequest {
        return .init(
            assistantId: self.assistantId,
            maxResults: self.maxResults,
            nextToken: token,
            queryText: self.queryText
        )
    }
}

extension Wisdom.SearchContentRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> Wisdom.SearchContentRequest {
        return .init(
            knowledgeBaseId: self.knowledgeBaseId,
            maxResults: self.maxResults,
            nextToken: token,
            searchExpression: self.searchExpression
        )
    }
}

extension Wisdom.SearchQuickResponsesRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> Wisdom.SearchQuickResponsesRequest {
        return .init(
            attributes: self.attributes,
            knowledgeBaseId: self.knowledgeBaseId,
            maxResults: self.maxResults,
            nextToken: token,
            searchExpression: self.searchExpression
        )
    }
}

extension Wisdom.SearchSessionsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> Wisdom.SearchSessionsRequest {
        return .init(
            assistantId: self.assistantId,
            maxResults: self.maxResults,
            nextToken: token,
            searchExpression: self.searchExpression
        )
    }
}
